import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/modules/hire/pages/hire_rent_rent/logic.dart';
import 'package:honeypotflutter/publicBussine/view/bussine_card.dart';
import 'hire_rent_rent_box_one/view.dart';

class HireRentRentBox extends StatelessWidget {
  HireRentRentBox({super.key});

  final HireRentRentLogic _logic = Get.find<HireRentRentLogic>();

  @override
  Widget build(BuildContext context) {
    return MGCard(
      padding: EdgeInsets.all(16),
      margin: EdgeInsets.only(top: 16),
      children: [
        HireRentRentBoxOnePage(
          title: "小格口",
          count: _logic.itemModel.smallNo,
          price: _logic.priceModel.tmcDeviceFeeContractPriceS13,
          selectAction: (int count) {
            _logic.smallSelectBox = count;
            _logic.updateCountPrice();
          },
        ),
        HireRentRentBoxOnePage(
            title: "中格口",
            count: _logic.itemModel.mediumNo,
            price: _logic.priceModel.tmcDeviceFeeContractPriceS12,
            selectAction: (int count) {
              _logic.middleSelectBox = count;
              _logic.updateCountPrice();
            }),
        HireRentRentBoxOnePage(
            title: "大格口",
            count: _logic.itemModel.largeNo,
            price: _logic.priceModel.tmcDeviceFeeContractPriceS11,
            selectAction: (int count) {
              _logic.maxSelectBox = count;
              _logic.updateCountPrice();
            }),
      ],
    );
  }
}
